package com.apartment.own.controller;

import com.apartment.common.core.controller.BaseController;
import com.apartment.common.core.page.TableDataInfo;
import com.apartment.own.domain.OwnResHouseRoomConf;
import com.apartment.own.domain.OwnResPropertyFee;
import com.apartment.own.domain.TestStudent;
import com.apartment.own.domain.group.InsertMode;
import com.apartment.own.domain.group.UpdateMode;
import com.apartment.own.response.common.DynamicDic;
import com.apartment.own.service.ToolsService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import java.util.List;

@RestController
@ApiOperation("tools")
@RequestMapping("/own/tools")
public class ToolsController extends BaseController {

    @Autowired
    private ToolsService toolsService;

    @ApiOperation("list")
    @PostMapping("/list")
    @ResponseBody
    public  List<DynamicDic> list( @RequestBody List<String> list)
    {
        return toolsService.dynamicDicList(list);
    }
   @PostMapping("test")
   @ResponseBody
    public void test(@RequestBody @Validated({InsertMode.class}) TestStudent testStudent){
   //     public void test(@RequestBody @Validated({UpdateMode.class}) TestStudent testStudent){
        return ;
    }
}
